package com.aricksm.xuan.activity01;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

/**
 * Created by xuan on 16/6/15.
 */
public class ListView extends Activity {

    Button close;

    TextView text;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.list);

        String title = getIntent().getStringExtra("title");
        int id = getIntent().getIntExtra("id",0);

        text = (TextView) findViewById(R.id.textLog);
        text.setText("title:"+title+",id:"+id);

        close = (Button) findViewById(R.id.btn_finished);
        close.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                close();
            }
        });

    }

    public void close(){
        ListView.this.finish();
    }
}
